int cat_file(char* path)
{
	char buf[MAX_BLOCK_SIZE];
	int i = 0, bytesRead = 0;
	int file = open_file(path, FILE_READ);
	
	if (file < 0)
	{
		printf("Could not open \"%s\"\n\n", path);
		return -1;
	}
	
	do
	{
		bytesRead = read_file(file, buf, MAX_BLOCK_SIZE);
		for (i = 0; i < bytesRead; i++)
			putchar(buf[i]);
		memset(buf, '\0', MAX_PATH_LENGTH);
	} while (bytesRead);
	
	putchar('\n');
	close_file(file);
	return 1;
}

int do_cat(char* path)
{
	char fullPath[MAX_PATH_LENGTH];
	
	if (path[0] != '/')
	{
		get_pwd_name(runningProc->cwd, fullPath);
		strcat(fullPath, path);
	}
	else
		strcpy(fullPath, path);
		
	return cat_file(fullPath);
}
